package cn.zzuisa.news.entity;

import java.sql.Timestamp;
import java.util.Date;

/**
 * @ClassName: User.java
 * @Description: TODO用户实体类
 * @author zzuisa
 * @version V1.0
 * @Date 2018年9月4日 上午10:50:10
 */
public class User {
	private Integer id;
	private String username;
	private String password;
	/**
	 * 用户昵称
	 */
	private String nickname;
	/**
	 * 用户邮箱
	 */
	private String email;
	/**
	 * 用户积分 （用户等级依据，发表新闻时增加)
	 * 积分表：{
	 * 			lv1 : 0~100
	 * 			lv2 : 101~200
	 * 			lv3 : 201~400
	 * 			lv4 : 401~
	 * 		  }
	 */
	private Integer point;
	/**
	 * 用户权限 
	 * 权限{
	 * 	0:普通用户,
	 * 	1:管理员
	 * }
	 */
	private Integer role;
	/**
	 * 用户状态 
	 * 状态{
	 * 	0:正常,
	 * 	1:冻结,
	 *  2:异常(被举报)
	 * }
	 */	
	private Integer state;
	/**
	 * 用户创建时间  (@database:TIMESTAMP)
	 */
	private Timestamp createtime;

	public Integer getId() {
		return id;
	}

	public void setId(Integer id) {
		this.id = id;
	}

	public String getUsername() {
		return username;
	}

	public void setUsername(String username) {
		this.username = username;
	}

	public String getPassword() {
		return password;
	}

	public void setPassword(String password) {
		this.password = password;
	}

	public String getNickname() {
		return nickname;
	}

	public void setNickname(String nickname) {
		this.nickname = nickname;
	}
	

	public String getEmail() {
		return email;
	}

	public void setEmail(String email) {
		this.email = email;
	}

	public Integer getPoint() {
		return point;
	}

	public void setPoint(Integer point) {
		this.point = point;
	}

	public Integer getRole() {
		return role;
	}

	public void setRole(Integer role) {
		this.role = role;
	}

	public Integer getState() {
		return state;
	}

	public void setState(Integer state) {
		this.state = state;
	}

	

	public Timestamp getCreatetime() {
		return createtime;
	}

	public void setCreatetime(Timestamp createtime) {
		this.createtime = createtime;
	}

	@Override
	public String toString() {
		return "User [id=" + id + ", username=" + username + ", password=" + password + ", nickname=" + nickname
				+ ", email=" + email + ", point=" + point + ", role=" + role + ", state=" + state + ", createtime="
				+ createtime + "]";
	}
	

}
/**
 * `id` INT AUTO_INCREMENT NOT NULL COMMENT '用户编号',
 *  `username` VARCHAR(20) NOT NULL COMMENT '用户名', 
 *  `password` VARCHAR(24) NOT NULL COMMENT '密码', `nickname` VARCHAR(24) NOT NULL COMMENT '昵称', 
 * `point` INTEGER DEFAULT '0' COMMENT '积分,等级分布依据，详查《积分表》',
 *  `role` INTEGER DEFAULT '0' COMMENT '权限 0普通用户 1管理员',
 * `state` INTEGER DEFAULT '0' COMMENT '用户状态 0正常 1冻结 2异常(被举报)',
 * `createtime` TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '创建时间' , PRIMARY KEY(`id`) )
 */
